check if a number is prime or not in c